home *** CD-ROM | disk | FTP | other *** search
/ Adobe Graphics & Publishing SDK 1996 December / Adobe Graphics & Publishing SDK 1996 December.iso / mac / PageMaker 6.5 SDK Mac / SourceCode / PageMakerClassLibrary / LowLevel / PReplyBuf.h < prev    next >
C/C++ Source or Header  |  1996-09-05  |  1KB  |  49 lines

  1. /*
  2.  *--- PReplyBuf.h ---------------------------------------------------------
  3.  * Copyright (c) 1995-96 Adobe Systems Incorporated.  All rights reserved.
  4.  * Created on Thu, Oct 19, 1995 @ 8:18 PM by Paul Ferguson.
  5.  *-------------------------------------------------------------------------
  6.  */
  7. #ifndef __PReplyBuf__
  8. #define __PReplyBuf__
  9.  
  10. #ifdef __MWERKS__
  11. #pragma once
  12. #endif
  13.  
  14. #include "PMTypes.h"
  15.  
  16.  
  17. class PReplyBuf
  18. {
  19.  
  20. public:
  21.  
  22.     PReplyBuf(const char * ch);
  23.  
  24.     PReplyBuf& operator>> (const char ** aStringRef);    // Just set char * and scan over the string.
  25.     PReplyBuf& operator>> (char * aString);                // Copy the C string.
  26.     PReplyBuf& operator>> (unsigned char * aString);    // Copy the Pascal string.
  27.     PReplyBuf& operator>> (short& aShort);
  28.     PReplyBuf& operator>> (unsigned short& aShort);
  29.     PReplyBuf& operator>> (long& aLong);
  30.     PReplyBuf& operator>> (unsigned long& aLong);
  31.  
  32.     void        Reset() { curCh = bufStart; }
  33.     
  34.     operator const char *() { return curCh; }
  35.  
  36. private:
  37.  
  38.     const char    * bufStart;
  39.     const char    * curCh;
  40.  
  41.     PReplyBuf();
  42.     PReplyBuf(PReplyBuf&);
  43.     PReplyBuf&    operator=(const PReplyBuf&);
  44. };
  45.  
  46. #endif
  47.  
  48. // end of PReplyBuf.h
  49.